import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Rectangle rect = new Rectangle();
        Scanner scan = new Scanner(System.in);
        double length = scan.nextDouble();
        double width = scan.nextDouble();
        rect.setXY(length, width);
        double s = rect.getArea();
        double c = rect.getPerimeter();
        System.out.println("面积为" + s);
        System.out.println("周长为" + c);
    }
}

class Rectangle {
    private double length;
    private double width;

    public Rectangle() {
        this.length = 0;
        this.width = 0;
    }

    public void setXY(double a, double b) {
        this.length = a;
        this.width = b;
    }

    public double getArea() {
        return this.length * this.width;
    }

    public double getPerimeter() {
        return 2*(this.length + this.width);
    }
}

